home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 May / SGI IRIX 6.5 Complementary Applications 2004 May.iso / dist / PPRO.idb / usr / bin / cups-config.z / cups-config
Encoding:
Text File  |  2004-01-20  |  2.7 KB  |  135 lines

  1. #!/bin/sh
  2. #
  3. # "$Id: cups-config.in,v 1.22 2003/09/17 19:35:21 mike Exp $"
  4. #   CUPS configuration utility.
  5. #
  6. #   Copyright 2001-2003 by Easy Software Products, all rights reserved.
  7. #
  8. #   These coded instructions, statements, and computer programs are the
  9. #   property of Easy Software Products and are protected by Federal
  10. #   copyright law.  Distribution and use rights are outlined in the file
  11. #   "LICENSE.txt" which should have been included with this file.  If this
  12. #   file is missing or damaged please contact Easy Software Products
  13. #   at:
  14. #
  15. #       Attn: CUPS Licensing Information
  16. #       Easy Software Products
  17. #       44141 Airport View Drive, Suite 204
  18. #       Hollywood, Maryland 20636-3111 USA
  19. #
  20. #       Voice: (301) 373-9603
  21. #       EMail: cups-info@cups.org
  22. #         WWW: http://www.cups.org
  23. #
  24.  
  25. VERSION="1.1.20"
  26. APIVERSION="1.1"
  27.  
  28. prefix=/
  29. exec_prefix=/usr
  30. bindir=${exec_prefix}/bin
  31. includedir=/usr/include
  32. libdir=/usr/lib32
  33. datadir=/usr/share
  34. sysconfdir=/etc
  35. cups_datadir=/usr/share/cups
  36. cups_serverbin=/usr/lib32/cups
  37. cups_serverroot=/etc/cups
  38.  
  39. # flags for C++ compiler:
  40. CFLAGS=""
  41. LDFLAGS=""
  42. LIBS="  "
  43. IMGLIBS="  -lm "
  44.  
  45. if test $includedir != /usr/include; then
  46.     CFLAGS="$CFLAGS -I$includedir"
  47. fi
  48.  
  49. if test $libdir != /usr/lib -a $libdir != /usr/lib32; then
  50.     LDFLAGS="$LDFLAGS -L$libdir"
  51. fi
  52.  
  53. usage ()
  54. {
  55.     echo "Usage: cups-config --api-version"
  56.     echo "       cups-config --cflags"
  57.     echo "       cups-config --datadir"
  58.     echo "       cups-config --help"
  59.     echo "       cups-config --ldflags"
  60.     echo "       cups-config [--image] [--static] --libs"
  61.     echo "       cups-config --serverbin"
  62.     echo "       cups-config --serverroot"
  63.     echo "       cups-config --version"
  64.  
  65.     exit $1
  66. }
  67.  
  68. if test $# -eq 0; then
  69.     usage 1
  70. fi
  71.  
  72. # Parse command line options
  73. static=no
  74. image=no
  75.  
  76. while test $# -gt 0; do
  77.     case $1 in
  78.     --api-version)
  79.         echo $APIVERSION
  80.         ;;
  81.     --cflags)
  82.         echo $CFLAGS
  83.         ;;
  84.     --datadir)
  85.         echo $cups_datadir
  86.         ;;
  87.     --help)
  88.         usage 0
  89.         ;;
  90.     --image)
  91.         image=yes
  92.         ;;
  93.     --ldflags)
  94.         echo $LDFLAGS
  95.         ;;
  96.     --libs)
  97.         if test $static = no; then
  98.             if test $image = no; then
  99.                 echo -lcups $LIBS
  100.         else
  101.                 echo -lcupsimage $IMGLIBS -lcups $LIBS
  102.         fi
  103.         else
  104.             if test $image = no; then
  105.                 echo $libdir/libcups.a $LIBS
  106.         else
  107.                 echo $libdir/libcupsimage.a $IMGLIBS $libdir/libcups.a $LIBS
  108.         fi
  109.         fi
  110.         ;;
  111.     --serverbin)
  112.         echo $cups_serverbin
  113.         ;;
  114.     --serverroot)
  115.         echo $cups_serverroot
  116.         ;;
  117.     --static)
  118.         static=yes
  119.         ;;
  120.     --version)
  121.         echo $VERSION
  122.         ;;
  123.     *)
  124.         usage 1
  125.         ;;
  126.     esac
  127.  
  128.     shift
  129. done
  130.  
  131. #
  132. # End of "$Id: cups-config.in,v 1.22 2003/09/17 19:35:21 mike Exp $".
  133. #
  134.